const http = require('http');

http.createServer((req, res) => {
    res.setHeader('Access-Control-Allow-Origin', '*')
    var user = {
        name: "杨克强",
        sex: "不详",
        age: 15,
        weight: 100,
        tel: 110
    }
    user = JSON.stringify(user)
    // res.end('fn(' + user + ')')
    res.end(user)
}).listen(3000, () => {
    console.log('serve is running')
})